<form nz-form [formGroup]="group" (ngSubmit)="submit()">
  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">名称</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="nameErrorTpl">
      <input nz-input formControlName="name" />
      <ng-template #nameErrorTpl let-control>
        <ng-container *ngIf="control.hasError('required')">请输入名称!</ng-container>
      </ng-template>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="desc">说明</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="">
      <textarea nz-input formControlName="desc"></textarea>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="port">端口</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="">
      <nz-input-number formControlName="port" [nzMax]="65535" [nzMin]="100"></nz-input-number>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="cert">cert</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="">
      <input nz-input formControlName="cert" />
    </nz-form-control>
  </nz-form-item>
  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="key">key</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24" [nzErrorTip]="">
      <input nz-input formControlName="key" />
    </nz-form-control>
  </nz-form-item>
</form>